<?php include '../init.php';

	//查询列表
	$sql = "select * from user";
	$result = $mysql->getAll($sql);
?>
<!DOCTYPE html>
<html>
<head>
	<title>管理员列表</title>
	<link rel="stylesheet" type="text/css" href="<?php echo __PUBLIC__;?>/bootsrap/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="<?php echo __PUBLIC__;?>/css/back.css">
	<script type="text/javascript" src="<?php echo __PUBLIC__;?>/js/jquery.js"></script>
	<script type="text/javascript" src="<?php echo __PUBLIC__;?>/bootsrap/js/bootstrap.min.js"></script>
</head>
<body background="../../public/img/bg4.jpg">
	<div>&nbsp;</div>
	<div>&nbsp;</div>
	<div class="container bg-info">
		<div class="col-md-12">&nbsp;</div>
		<div class="col-md-12">&nbsp;</div>
		<div class="row">
			<?php include '../nav.php'; ?>
		</div>
	</div>
	<div class="container bg-info">
		<div class="col-md-12">&nbsp;</div>
		<div class="col-md-12">&nbsp;</div>
		<div class="row">
			<div class="col-md-12" style="padding-left: 20px;font-size: 18px;height: 25px;line-height: 25px;"><span class="glyphicon glyphicon-th-list"></span>  管理员列表</div>
			<div class="col-md-12">&nbsp;</div>
			<div class="col-md-12"><a href="<?php echo $config['local'];?>/admin/system/adminform.php" class="btn btn-success">添加管理员</a></div>
		</div>
			<table class="table table-hover">
				<div class="col-md-12">&nbsp;</div>
				<thead>
					<tr>
						<th class="text-center">id</th>
						<th class="text-center">管理员</th>
						<th class="text-center">操作</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($result as $key => $row): ?>
						<tr>
							<td class="text-center"><?php echo $row['id'];?></td>
							<td class="text-center"><?php echo $row['username'];?></td>
							<td class="text-center"><a class="btn btn-defalut" href="adminform.php?id=<?php echo $row['id'];?>">编辑</a></td>
						</tr>
					<?php endforeach ?>
				</tbody>
			</table>
		</div>
	</div>
</body>
</html>